home *** CD-ROM | disk | FTP | other *** search
/ The Games Machine 76 / XENIATGM66.iso / Indiana Jones / Indiana Jones.exe / RESOURCE / PREVIEW.GOB / cog_sol_comfallswhip.cog < prev    next >
Text File  |  1999-11-15  |  2KB  |  91 lines

  1. # Jones 3D Cog Script
  2. #
  3. # SOL_ComFallsWhip.cog
  4. #
  5. # [TRM]
  6. #
  7. # (C) 1999 LucasArts Entertainment Co. All Rights Reserved
  8. # ========================================================================================
  9.  
  10. symbols
  11.     
  12.     message     damaged
  13.     message     entered
  14.         
  15.     thing       player      local
  16.     thing       strut       #mask=0x8
  17.     thing       whipCam1
  18.     
  19.     surface     thisSide
  20.     surface     thatSide
  21.     
  22.     sound       mus_Cue=mus_gen_indywhip1.wav       local
  23.     
  24.     int         side1=1         local
  25.     int         side2=0         local
  26.     int         firstTime=1     local
  27.     
  28. end
  29.  
  30.  
  31. # ========================================================================================
  32.  
  33. code
  34.  
  35. damaged:
  36.  
  37.     player = GetLocalPlayerThing();
  38.     
  39.     if(GetParam(1) == 0x10)
  40.     {
  41.         if(firstTime == 1)
  42.         {
  43.             firstTime = 0;
  44.             Sleep(2.0);
  45.             PlaySoundLocal(mus_Cue, 1.0, 0.0, 0x0, 0);
  46.         }
  47.         
  48.         # disable controls, switch camera
  49.         StartCutscene(0);
  50.         SetActorFlags(player, 0x200000);
  51.         SetCameraFocus(2, whipCam1);
  52.         SetCameraSecondaryFocus(2, player);
  53.         SetCurrentCamera(2);
  54.         SetCameraFOV(70, 0, 0.0);
  55.     }
  56.                 
  57.     return;
  58.  
  59. # ========================================================================================
  60.  
  61. entered:
  62.     
  63.     # land on gem side
  64.     if((GetSenderRef() == thatSide) && (side2 == 0))
  65.     {
  66.         side2 = 1;
  67.         ClearActorFlags(player, 0x200000);
  68.         EndCutscene();
  69.         SetCameraFOV(90, 0, 0.0);
  70.         SetCurrentCamera(1);
  71.     }
  72.     
  73.     # land on blockade side
  74.     if((GetSenderRef() == thisSide) && (side2 == 1))
  75.     {
  76.         side2 = 0;
  77.         side1 = 1;
  78.         ClearActorFlags(player, 0x200000);
  79.         EndCutscene();
  80.         SetCameraFOV(90, 0, 0.0);
  81.         SetCurrentCamera(1);
  82.     }
  83.         
  84.     return;
  85.                
  86. # ========================================================================================
  87.  
  88.  
  89. end
  90.  
  91.